package com.work.tz.controller;

import com.work.tz.model.TaskTmpl;
import com.work.tz.service.TaskService;
import com.work.util.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("task1")
public class TaskController {

    @Autowired
    private TaskService taskService;

    @RequestMapping(value = "/saveTask" ,method = RequestMethod.POST)
    public ResponseResult saveTask(@RequestBody TaskTmpl task){
        taskService.saveTask(task);
        return ResponseResult.OK();
    }

}
